import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex);

// 创建store实例
const state = {
  city:'上海'
};
const mutations = {
  changeCity(state,cityName){
    state.city = cityName;
    //console.log(this.state.city)
  }
};
export default new Vuex.Store({
  state,//抛出state的内容
  mutations
})

